more debugging for ios... need a better way!