original .m scripts from Jean Pierre