finished code for turn-in