from query to bind-attr