merged changes from 0.3 branch