Move a couple of math functions heret: