state.py: use .sort() instead of sorted() since chunks is a list