refactoring
adding error light reset