finished hw1 part 1, version 1