refs now working apparently