implemented pausing, needs more testing