refac layout