now works purely from shell script