updated rail.sh