moving ref, updating with temple