end of prog assignment 2