working through funtctons