added more Scala solutions