updated manifest and moved regex into function rather than using $CONFIG