fixed searchfunction, updates view