State pattern is added.