add associative type checks
implement pretty printing