fix #6 arithmetic handling