updated with smarts while creating new entities. see additional test