working get and put with arraylist