generics on filter, map, flatMap and onSuccess