First approach to implement the State pattern