#62 make sorting and filtering thread-safe