added rough mysql applier logic