update script and add script for mongodb