stack by doubling the array