refactored layout margin