adding mysql checks and add trans helper