finished programming assignment 3