added ability to retrieve squared distance, explained storage a bit better