added in checks to shell script