using functions to organize code