finalized building example in the trails controller