simplified the program