Changed duration from milliseconds to seconds