all code ported into Require.