assigment 2 implemented