Querywriter

the codigo was improved to facilitate progress..