scripts to add variables for 2D analysis