make period finding more automatic