framework: nearly done