added sorting on contacts