engine algorithm major improvment