variables renamed, and more options added