changed -b default argument test to not use array length (more portable)