improved handling of quantitative states and  implementation of equations