add timer in beta() function