glue manipulation code