add some math tools