benchmark code improved