added function for searching inbox contents