v0.8.0, improve code