fixed inconsistency with core data
final version for homework 2c
final commit