substitute with p2 update ui