keys passed as pointers everywhere