Seporate ranges logic