fixed drawSorted, add interval value