updated prompt branch function to include p4 stream check