refactored week 1 sources