changed the condition execution for lookup