improve self-typing