bind tests and impl
small fixes to bind impl and test
Merge branch 'bind'
add bind test to index