Ref by extract to function