reimplemented pause and shorted loop