advanced version to v0.5.1