sorting and searching

sorting not complete yet.