initial version of prog assignment 2