type hinting to avoid dispatch overheads