code used while following this tutorial http://www.techotopia.com/index.php/An_iOS_7_Core_Data_Tutorial