type hints added to methods, as per rBSfe4cb29514a4ed71e085a7c63ea5260c978b8359