first version of assignment 6.1