replaced tagged union with simpler datatypes in SGList