not using global variables