added accuracy calculation