raw code for adding elements dynamically