added support for type checking on parameters