workign on ref