[FIX] simplified some math and conversions