fixed cout, set proper branch status