$periods should be initialised as an empty array;