added build of valid expressions and reduced to only one operations stack