add script for terminating instances