Flag for page-per-week? Stats per-week? Maybe tricky, have to copy the aray. Stats to-this-week - just have to work out in show_results (where we have thisweek defined) what final_idx(thisweek) is, because the sort_stats() routine can take a final array element to sort. New strategy proposal: actual.work 1 25 Jul 09 00 25 Jul 14 00 # In the office (1) actual.work 3 25 Jul 14 00 25 Jul 16 00 # Travelling (2) actual.work 2 25 Jul 16 00 25 Jul 19 00 # Onsite (3) These all go on the same line... I guess this'd mean that: drink 25 Jul 19 00 25 Jul 23 00 would become drink 1 25 Jul 19 00 25 Jul 23 00 and so on, for single-state items. Done: Statistics - all that's done by the current program. Done. Tot-up actual.work per week. Total Sleep per day