add pixel debugging logic