Initial implementation of math api