working for put and get functionalities with arrayList