Start to impement BHHH algorithm