added filtering (on java side)