code for foundations 2 iOS work