using functions for modularity 4535431