check commit function