changed error's inherits style
refactor code
refactor code