added method for using arraylist. added junit test. did comparison...
arraylist is faster