added .replace({}) method to simplify prototyping