changed < to <= and > to >=