changed Counter core

uid -> IP
removed some redundant code