small edits to main script