commit a class