fleshed out assignment 2