added end game message
some code cleanup