refactoring core to add exception handle