Added a few debug statements, I am always getting the start of the next appointment is 39 whereas it should be 4 still need to debug this