trying mongoose on middleware