Strain induced layered to spinel phase transformation in metal oxide cathodes