safeselect and write queries working

safeselect, write queries, parameters working