deleted some duplication and changed empty search redirect to dashboard