Yaaaay Factory design pattern for state