only listen for one variable. added debug statements