instead of doing with switch cases, doing with abstract enums
implementation.