cleaned up white space and took out reading from a file