Program works and has correct output.