coding trailController...