corrected benchmark code