Fit the code to BLP data