refactored Layout API