autocommit
refactored