algorithm workable! still much to improve, but it looks spiffy enough for now =]