modified key expansion to use vector : not tested yet