changed map to data. fixed the callback