refactored error triggering flag
Cleaned upt of unused methods
update