Wroking with graphics and core data