Redesign to a lot more simple time period algoritm