from lire 20130927 and there are some modification for mcfire/glasearch