changed Lists to arrays, and it's much faster now