working but need many fixes