extract functional scripts