added spacebar pausing