Ugly code, but it works for most of the cases
Updated with numbers/calculator
Partially finished converter, started alarm