convert closures to prototypes in mob class