My attempt at a convertor