sortings and flattening arrays is fun