added search function
updated rules for searching
added search function