Added logic to update status in RP