Change scripts to calculate BASE automatically