added parse duration method