Changed way of resolving, by removing NUMERIC and using variation of Kernighan method
removed trailing spaces