update type errors and docs