sort pictures sanely