name the functions right, attach it to the document