update library, fix sort and add search by id