more work on cs758 assignment 7