time optimalization, added a few features to DietManager