added default arg for resource in transaction constructor