implemented mongoose back-end first iteration