create correct filter + sorting