add ability to predict probabilities
refactor and imrove documentation