fixed a bug: need not use parseInt() on startNum, but should use it on
ip.