working but now need to polish and document