replaced take by returning null