error system is refactored