clean up type inference