improve way to obtain default period