To avoid redundancy, here I just change the code to use append_elements method too.