Added loop controller