add ip validation

this start to fix #22