implemented ifa level logic