pass prototype into function, and use full name in name attribute.