updated scripts for handling locations