end and putstack