implementing tranactions for buying and selling resources