updated for mysql