bulk of functionality complete