code improvement: create the element attributes just from model not manual