removed undefined variables