adding type hints and updating docs