Now uses vector instead of arrays!