add new functionality and add ErrorHandler