added map function to chipbot