added probability map function