fix var regular expression to handle more cases
add error msgs. check for refs with displacements as well.