finished the backend of the framework