finished script; if name main will be removed