corrected type-hints everywhere