new structure without template generator
not tested mysql requests