if no goal is specified, the variable should be set to be an empty array.