mostly working core data