fix bug in nnmatthew
fix matthews calcultion