Testing the commit function