added loop ref