my solution to lab1 before lab2 starting!