fixed enterprise if statement to work (end needs to use a variable)