converting bars to boxes