updated search and upload business logic