updated codes for using threshold variables
changed the soap's position in regions.txt