rewrites on Maybe and Either