REF source code