making the code more readable by breaking it up the big one-liner