adding functionality to save , update by table name