do rule calc with math instead of lookup table