added autocommiting.