just about done...pending possibly two refactors