0.0.4
moved replace key into its own function so that can be used independently