link readline if possible