working relations + ui (needs refactoring)