fixed definition of objective function
fixed bug in branchlength