mongoose and rest