Updating code for RPubs