use vec for holding state