dealing with transaction