Added persistence and sorting