search and assign in contribute now works, needs refactoring