added more checks to gamelogic