image generator regular way and with array
sorting arrays, passing array to functions