needs to detect period first.
needs to detect period first.