read and branch