my Solution for assignment 2