SWUtil.scala updated