Converts to mongoose