removed the use of GADTs