commit function okay