HOMEWORK #3(FINAL VERSION)