added new functions to compute true results. made some other modifications