improved logic, UI