updated with sort and other