Update script to work with Galaxy