new version. no self args, optimizations