map function is dynamic