use layout to reduce duplication