changed vectors to arraylists