added method 'reverse()' for ArrayList