some changes in order to make search work