High speed all optical memory based on symmetric Mach-Zehnder switches