parseJS function, for when we need to load a function from mongo