hopefully finished programming assignment 2