changes in the first part of the script to allow it to work for corrmnebf