Version 2 with speedup and looping