Fixed an unclear variable name, made duration a string.