removed 'keys' as a passed through parameter; set as a global variable