prototype of auto_commit()