Added while loop for BRinterface