some work on math stuff