made dates_to_wdays take less memory