edited completed programming assignment 2