creating custom elements (generated in loop)