update mongoose and resource