Changed order to 1 and attempted to prevent creating array each instant in loop