added sorting by visit date