implement search in application template, will move to header after this commit