add in out detect