code updated with all the development from branch:devel
successfull tests for 1 and 2imp PAM.