added type-checking framework