partially works- checking out the flags
problem in saving the vertex state
Problem in saving the state of vertex