Adjusted somewhat for bb-4