added search and match solution