replacing collections with arraylists