update map function signature