minor modifications and bash added