reduced nesting in pub method