Moved search to seaparate file