Okapi calculation seems to be working, optimization is needed though.