implemented flashing function using ibeacon library.