add type checking for business logic
update the doc