Homework2 version 1