reformatting to  5 lines of Scala