created constructor for initializing mongo