genericise Reader and Writer