Use apply() rather than commit()