ref stuff