split code and relayout a little