write code for bindings