add custom data structures and initial database logic to gettx.hs