begin attempt at migration to rust using only standard libs