fix new require function
cleanup