solved multipleselect bug and did a refactoring