added comments for transaction management