fix generic, add benchmark