         let cellIdentifier = menuOptions[indexPath.row].cellIdentifier
         let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath);
         
-        if (indexPath.row + 1) % 1 == 0
-        {
-            cell.contentView.backgroundColor = UIColor(red: 238.0/255.0, green: 121.0/255.0, blue: 101.0/255.0, alpha: 1.0)
-        }
-        if (indexPath.row + 1) % 2 == 0
-        {
-            cell.contentView.backgroundColor = UIColor(red: 192.0/255.0, green: 105.0/255.0, blue: 155.0/255.0, alpha: 1.0)
-        }
-        if (indexPath.row + 1) % 3 == 0
-        {
-            cell.contentView.backgroundColor = UIColor(red: 239.0/255.0, green: 173.0/255.0, blue: 150.0/255.0, alpha: 1.0)
-        }
-        
+        cell.contentView.backgroundColor = colorFor(indexPath)
         cell.textLabel?.text = menuOptions[indexPath.row].title
         
         if let subtitle = menuOptions[indexPath.row].subtitle

        }
    }
    
    deinit {
       // NSNotificationCenter.defaultCenter().removeObserver(self)
    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {


import UIKit

class WhenViewController : UIViewController {
    
    @IBOutlet weak private var tableView: UITableView?
    lazy var menuOptions: [MenuOption] = {
        return DataService().whenMenuOptions()
    }()
    
    // MARK: View lifecycle
    override func viewWillAppear(animated: Bool) {
        if let selectedIndex = tableView?.indexPathForSelectedRow
        {
