finally got the loop working