split out finctions. Added mwf_hosts to call the other scripts