fixing up lib to work with new Rust