Added script to calculate boundaries