Working solution, but needs polishing