exercises for past assignment 1