If you make this a lazy val, it will have the same effect, be more efficient, and be less code