added new trail functionality