implemented and end game