merge math changes

enable returning values from math functions