working on controller logic for box arrangement