merged branch 0.4 into master