completed first part of assignment 1