state transition mostly working!!