complete the framework logic