changes sh and minor bugs