my version of assignment 3