I inserted the corresponding code for functions