restructuring + brush-up for m2