Corrected types and added benchmarking code