creates component correctly in the DOM