changed api
added error handler remark