removed functions from stack code