Change pump() loop using timeout()