merged commits from pull#38

merged commits from pull #38
also added legacy support for any code pre-options parameters