Added test function to print accuracy