Refactored accuracy test