add ip functions
add ip functions