The code for the Phoenix-R paper