updated period extraction