added animation pausing