script to port carnegie