fix bugs and commit a solution