test the commit function