add state machine to user and design refactorng