got rid of n as variable and the global version of numItems