simple transaction management logic added