refactored code in order to identify actions by their name (instead of by a number) and to ease adding/removing actions