use arraylist where arraylists are returned