Made minor changes to correct output.