PS-scrambling function added