added piston functions