Using mongoose for database interaction