added delay to game loop