split controllers and some implementation of search