add getDuration method