expand function

k-expansion.