add a function to append a cloned element, return actual element from appending JS