modified teamimage script