deleted extra mongoose module and incorporated Nick's suggestions