add ip integration
fix some bug