fix search function
1. argument order
2. eliminate std error