added bind2 and refactored stuff to use it. much shortness.