Refactor the slugging_percentage method by breaking the formula into smaller terms