added prob calculation