better way of debug checking for the key