added search option and few other fixes