sort out entity framework stuff