Implemented search in order to work without scope crazyness