turn the statement into a function