state-machine using code tags for gem section