make a function in the hal