add Euclidean distance and Stack<T> helper class