added optional state for launch url