resolved bad distances due to implicit type conversions :(