refactor and almost fixed getDayInfo function, started testing