first version of assignment2