refactor(main) checkParams