split loading and querying into 2 modules