getting data from mongodb.