rust implementation to rust 0.11.0