main script modification