add State pattern