Added leaf variable, need to update for test