do your own math

because third-party lib is weird