increased trail interval to 20 iterations, made it a configuarble variable