not fully working but improvements made