edits to analysis script