added BSQ to BIP function.