add query logic
add hoist-errors