adds attributes and tempaltes