The Solution

(its in vb)