new algo attempt & notes