adding progress so far. I think I've implemented the algorithm i want. Feel like switching to the desktop though.