convert transactions route to use lib file