detach filter fucntion from rdd