added some classes and new pause and resume functionality