transaction class for handling transactions