made duration a public readonly property