switch to long instead of int for corpus/periods lengths;add log likelyhood