added sorting and binding