bug sorting and filtering