modified script to run MEDUSA so can be called from Makefile