rework for mysql