math functions added