now incorporates duration, and fixed a bug where goals with one task didn't save properly