incorporating built-in functions into the code