pull test into master

test branch seems ok, merge up to master.