7) refactor cipher challenge