update for portal end condition