updated ifequal to handle else tags as well