the working loop