add functions to DOM