got a loop cubed to work