add OnRun and OnClear