clean implementation of 2d-core(shaky156)