stuff done a long time ago for search function
resolving conflicts