tried to explain state patterns