updated bind func handle different kind of binds.