port to Rust 0.11 (not yet working)