added get duration method