fixed small bugs, added info about sorting