changed object type to ArrayList