some fixes ... stuck with UI though