wrapping future queries in functions to avoid errors when sourcing the files