Updated functions.s