add return code for as.sh