adding type hint and extend example
added comments
added comments