put some code to a function, figure out the use of querySelector