set default params and some validations