preparing functions to be called from other components