further work on smarter algorithms