add and commit at once