merged update from BG branch, now tuning