adding chi squared... trying to improve accuracy