working on ref