refactoring a little bit and removing unused functions
add a pause button + mechanism