fixed email bug and implemented a database search that doesnt depend on lucene
resolving conflict