general framework done