added -b switch to script