optimized before_script.sh for multiple executions