combine above 2 conditions into one