small code reduction