changed newName to name and fixed a }