Uses more appropriate pause() function, rather than sleeping some random
constant