first attempt of assignment 2