OR function is replaced with exists function of scala collections API