completed week 2 but without tests and with conditional logic