added pause(float time) method and fixed example