fixed issues in main, chenged search function headers