fix prob calculation