made the repeater section slightly simpler by moving the string manipulation part into the strstr if function.