not using any global variables