attempting assignment 2 -- not tested