Minor updates. included sorting