figuring out a bug