need to finish more complex type checking, make threading errors easier