changed  function to replace placeholder element with target issue #149