first attempt at assignment 2