updated binder.cpp code