finished programming assignment 2