extract methods to appease Scalastyle