Implemented getMaximumDistance