use period passed in as a parameter