created methods reset and pause and cleaned up more code