commit how to design functions