completed search and refactored partial for posts