logic works fine still to design the layout