working search and post functions