Partial expand function