change map function to private