eliminated redundant dim vars