Fragment data structure helper methods
fix stack idioms
union operator