typing functions