added some db escape safety to model

added some db insert sanity