nearly done, base framework done