first version of assignment 4