Answer to Programming Assognment 2