added a rust solution that works