my solution to Lab2