updated method style to reflect conventions in chapter 5.3 of programming in scala 2nd edition