redistributed logic to other methods