Refactor period into variable