Piston in Scala