added code for prob=TRUE