modified the gamecode