refactoring portal and adding search