created loop for ip extract rake task