finished converting stack to generic