improving assigment 2