working IP control code.