add getMaxPointTrail function