add mongos part to the script, but functionality is not complete yet.