initial workings on the loop