removed old algorithm