Added in the code to add the extra goal segments to the system