Jarvis-Judice-Ninke algorithm working. code is terrible though, need to refactor