execute query working, need to add output directory functionality
started building queries, shit is totally broken