InputOutput Algorithm now generic