add type hint and fix a mistake..