restructured the program layout to add more functionality while maintaining  programming structure