updated algo's