Still ugly; now working