removed undefined vars