adding sorting and filtering of results