worked on the interface TypestateMain