add bind method
support for timeout in bind method, update example usage in index.html