updated ref and build script