modified script to remove argv requirement