local storage added and applied to period - descrete period setting bug fixed