use string value of replacement to join array
removed old tests that expect an error and added new tests that expect functions to work