add simple search feature into leave history

error catch will be add later and apperance declaration will also be
added into the search function