modified according to the MERLIN settings from MERLIN