added empty part array check to lookup functions