finished programming assignment 4