add sorting and update style