add http and query factory