update to map and write test case and for Subscriber API