implemented filtering on server side