refactor
redesign and bugfixes