fixed bug which never allowed successful connections
functioning bindings, and added example