correct the params to save into mongodb