First attempt to convert cti to rust