added reverse_array solution