base64 to preserve original params
minor rework