merge v0.5 Code