first attempt at assignment 3