working but bugs are there.