added search function
fixed merge conflicts