implement all parts of env.sh