ref code back to auto