TODO: write unpack_binding