lot of optimalization and game pausing