trying to figure out bug