added mathematical functions