impl new method for ip caltulations