made progress, but need to check how my distance formula works with negative numbers.