Made stack generic