moved trail_api to env variable