added new stack code