modified script to remove api keys