complete most of the framework