Changing to more efficient check