simplified shell script, added rm