arraylist and general classes