yet more bugfixes, add pausing