solved problem two of week 3