Rust versions are bad, could use some love in refactoring secondly, a lot of code is repeated. applying DRY would make it better