updated prog assignment 2