updated arithmetic funtions